home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / communic / pbbsw151.zip / POWRMAIN.EXE / POWRLANG.DOC < prev    next >
Text File  |  1991-05-28  |  13KB  |  405 lines

  1.        POWERLANG
  2.        ────────────────────────────────────────────────────────────
  3.  
  4.         PowerLang is a Basic Type of Language, which permits you to write your
  5.         own menu routines.
  6.  
  7.         PowerLang files can be created by any text editor or word
  8.         processor which can edit standard text files.
  9.  
  10.         PowerLang files are read line by line, and run just like a basic
  11.         program.
  12.  
  13.         Here are the commands which are currently available in PowerLang:
  14.  
  15.                            Activity
  16.                            --------
  17.  
  18.   Structure: Activity "Info to be written to Activity Log"
  19.  
  20. Description: Writes info to the Activity Log.  Info in quotes can
  21.              be no larger than 75 characters.
  22.  
  23.    Examples: Activity "Added BBS to BBS Listed"
  24.              Activity "Loaded Viewage program"
  25.  
  26.                             Append
  27.                             ------
  28.  
  29.   Structure: Append "Path/Filename to open file for Append"
  30.  
  31. Description: This command will open a file to write to.  If the file
  32.              is not found, it is created.  The Write_File command will
  33.              write to the end of the file.  The file is NOT DELETED, the
  34.              data is written to the end of the file.
  35.  
  36.    Examples: Append "Blt.Dat"
  37.              Append "BBS.Lst"
  38.              Append "D:\Powrbbs\Blt\Blt4"
  39.  
  40.                           ClearScreen
  41.                           -----------
  42.  
  43.   Structure: ClearScreen
  44.  
  45. Description: Clears the screen
  46.  
  47.    Examples: Clearscreen
  48.  
  49.                              Close
  50.                              -----
  51.  
  52.   Structure: Close
  53.  
  54. Description: Closes the current open file (If a file is currently open)
  55.  
  56.    Examples: Close
  57.  
  58.                              Dec
  59.                              ---
  60.  
  61.   Structure: Dec [Integer Code] [Integer Code]
  62.              Dec TIME [integer Code]
  63.              Dec SAFE [integer Code]
  64.  
  65. Description: Decreases the integer.  For example, if you do (Dec I1 I2), if
  66.              I1 = 12 and I2 = 5, I1 becomes 7 and I2 stands at 5.
  67.  
  68.              You can Decrease the users TIME or SAFE by using this command.
  69.  
  70.    Examples: Dec I5 I7
  71.              Dec TIME I1
  72.              Dec SAFE I1
  73.  
  74.  
  75.                             Display
  76.                             -------
  77.  
  78.   Structure: Display "[Text to be displayed]"[;]
  79.              Display S1[;]
  80.              Display I1[;]
  81.  
  82. Description: Display sends text to the caller, and writes the info
  83.              on the local monitor.
  84.  
  85.       Usage: Text in " can be anything BUT Quotes ('"').
  86.              If a Comma (';') is placed at the end of the line,
  87.              no return (C/R) is send and written on the monitor.
  88.              If no Comma is present, C/R is sent and written on
  89.              the local monitor.
  90.  
  91.              To display a string or integer, just enter the code of
  92.              the string, integer.. You MUST include the S or I.
  93.  
  94.    Examples: Display "Welcome to the FUN world of BBSing.. "
  95.              Display "Enter your name: ";
  96.              Display I1;
  97.              Display I1
  98.              Display S1;
  99.              Display S1
  100.  
  101.                               Dos
  102.                               ---
  103.  
  104.   Structure: Dos "[Dos Command Line]"
  105.  
  106. Description: Shells to Dos, and runs the command in quotes (" ").
  107.              When the shell is complete, if the log file is found,
  108.              it is displayed and then erased.
  109.  
  110.    Examples: Dos "Dir >|LOG|"
  111.                This will do a directory of the current location, and
  112.                send the output to the |LOG| file.  The |LOG| file
  113.                is then displayed and erased.
  114.  
  115.                          Give_Value
  116.                          ----------
  117.  
  118.   Structure: Give_Value S1 "This is what S1 will equal"
  119.              Give_Value I1 "300"
  120.  
  121. Description: Assigns the identification code (either string or integer)
  122.              a new value which is assigned in quotes.
  123.  
  124.    Examples: Give_Value S9 "Welcome..."
  125.              Give_Value I1 "1"
  126.  
  127.                              If  (EndIf)
  128.                              --
  129.  
  130.   Structure: If [!] [Flag #]
  131.              If [!] [Char #] = "Character to compare character # with"
  132.              If [!] I1 = I2
  133.              If [!] I1 > I2
  134.              If [!] I1 < 12
  135.  
  136. Description: The If statement, will check to see if the flag is true, or
  137.              if the character is equal to the character in quotes.  If
  138.              the definition is true, all the commands after the If statement
  139.              will be run, until an EndIf statement is reached.
  140.  
  141.              If statements for integers can compare different integer
  142.              values..
  143.  
  144.              The ! is optional, and stands for Not.  In this case, if the
  145.              definition is false, then the if statement is run.
  146.  
  147.    Examples: If B1    (Use B and the number for flags)
  148.              Display "B1 = True"
  149.              Display "This statement is still run"
  150.              Endif
  151.  
  152.              If ! B1
  153.              Display "B1 = False"
  154.              Endif
  155.  
  156.              If C1 = "A"
  157.              Display "The Character #1 is equal to A!"
  158.              Endif
  159.  
  160.              If ! C1 = "A"
  161.              Display "The Character #1 is NOT equal to A!"
  162.              Endif
  163.  
  164.              If I1 > I2
  165.              Display "Integer I1, is greater than I2!"
  166.              Endif
  167.              If I1 = I2
  168.              Display "Integer I1, is equal to I2!"
  169.              Endif
  170.              If I1 < I2
  171.              Display "Integer I1 is less than I2!"
  172.  
  173. Note: You can place if statements, within an if statement.. Examples:
  174.  
  175.              If C1 = "A"
  176.               If I1 < I2
  177.                Display "I1 < I2 and C1 = A!"
  178.               Endif
  179.               If I1 > I2
  180.                Display "I1 > I2 and C1 = A!"
  181.               Endif
  182.               Display "GoodBye!"
  183.              Endif
  184.  
  185.                           Get_Return
  186.                           ----------
  187.  
  188.   Structure: Get_Return
  189.  
  190. Description: Forces the caller to type RETURN
  191.  
  192.    Examples: Get_Return
  193.  
  194.                            Get_Choice
  195.                            ----------
  196.  
  197.   Structure: Get_Choice [Ok_Char_String] [Char #]
  198.  
  199. Description: Forces the caller to keep inputing, until one of his
  200.              characters is contained in the OK_Char_String.  The
  201.              Char # is given this value.  The Char # can be from
  202.              1 - 25, and is understood as C and the number, such
  203.              as C1.  C does not have to be present in this command.
  204.  
  205.    Examples: Get_Choice YN 1
  206.                This command will wait until Y or N is pressed, and give
  207.                C1 the value which is pressed.
  208.  
  209.              Get_Choice ABCDEFG 4
  210.                This command will wait until one of the letters A,B,C,D,
  211.                E,F, or G are pressed, and give C4 that value.
  212.  
  213.                            Get_Yesno
  214.                            ---------
  215.  
  216.   Structure: Get_YesNo [Flag#]
  217.  
  218. Description: Forces caller to type Y or N.
  219.              If Y is pressed the Flag# given is assigned True
  220.              If N is pressed the Flag# given is assigned False
  221.  
  222.       Usage: The Flag# is a number from 1 to 25 (NO higher, NO lower).
  223.              B can be placed before the number, but is not necessary in
  224.              this function.  (It IS nessassary in other functions)
  225.  
  226.    Examples: Get_YesNo B1
  227.              Get_Yesno B3
  228.              Get_Yesno 4
  229.  
  230.                               Goto
  231.                               ----
  232.  
  233.   Structure: Goto [Line to move to]
  234.  
  235. Description: Goes to a certain line number.  Lines designated for GOTO,
  236.              begin with :.
  237.  
  238.    Examples: Goto END
  239.              :START
  240.              DISPLAY " This is Start "
  241.              :END
  242.              DISPLAY " This is End "
  243.  
  244.                              Inc
  245.                              ---
  246.  
  247.   Structure: Inc [Integer Code] [Integer Code]
  248.              Inc TIME [integer Code]
  249.              Inc SAFE [integer Code]
  250.  
  251. Description: Increases the integer.  For example, if you do (Inc I1 I2), if
  252.              I1 = 5 and I2 = 12, I1 becomes 17 and I2 stands at 12.
  253.  
  254.              You can increase the users TIME or SAFE by using this command.
  255.  
  256.    Examples: Inc I5 I7
  257.              Inc TIME I1
  258.              Inc SAFE I1
  259.  
  260.                           Input_String
  261.                           ------------
  262.  
  263.   Structure: Input_String [Max String Length] [String #]
  264.  
  265. Description: Gets a string from the caller (Combination of any characters),
  266.              up the the Maximum string length.  The Value of the String
  267.              Input is given to the String #.
  268.  
  269.       Usage: The Input String Number, is a variable defined as S and the
  270.              number of the string which can vary from 1 to 15.  You can
  271.              have up to 15 strings (S1-S20).  In this function, only the
  272.              number of the string has to be given, since only strings
  273.              are outputted. The Maximum length a string can be is 50
  274.              characters.
  275.  
  276.    Examples: Input_String 50 1
  277.              Input_String 25 2
  278.              Input_String 40 S3
  279.  
  280.                          Int_To_Str
  281.                          ----------
  282.  
  283.   Structure: Int_To_Str [Integer Code] [String Code]
  284.  
  285. Description: The integer value from the integer code is assigned to
  286.              a string
  287.  
  288.    Examples: Int_To_Str I1 S1
  289.              Int_To_Str I19 S5
  290.  
  291.                         Number_Input
  292.                         ------------
  293.  
  294.   Structure: Number_Input [Number Format] [String #]
  295.  
  296. Description: Inputs a number-format, and sends input to the string #
  297.              defined.  The Number Format is the same used in the
  298.              script questionnaires.  In for Number Format, wherever a
  299.              # is placed, the caller must enter a number.  Anything
  300.              else in the format, is just displayed to the user, and
  301.              also entered in the string #.
  302.  
  303.    Examples: Number_Input (###) ###-#### S1
  304.              Number_Input ##-##-## S2
  305.              Number_Input ##/##/## S3
  306.  
  307.                         Return_To_BBS
  308.                         -------------
  309.  
  310.   Structure: Return_To_BBS
  311.  
  312. Description: Quits, and returns to PowerBBS
  313.  
  314.    Examples: Return_To_BBS
  315.  
  316.                              Run
  317.                              ---
  318.  
  319.   Structure: Run "[PowrLang Source Code Path/Name to Run]"
  320.  
  321. Description: Quits out of the current code, and runs the code specified
  322.              in the Run QUOTES.  It quits the current code, and WILL
  323.              NOT COME BACK (Unless that source RUNs the current code again).
  324.  
  325.       Usage: Run "EndOf.Pow"
  326.              Run "Menu.Pow"
  327.  
  328.                            Set_Flag
  329.                            --------
  330.  
  331.   Structure: Set_Flag [FLAG #] [YES/NO]
  332.  
  333. Description: Sets the flag # to either true (YES) or false (NO).
  334.              Flag # can be a number from 1 - 25.
  335.  
  336.    Examples: Set_Flag B1 YES
  337.                Sets flag #1 to True
  338.  
  339.              Set_Flag B19 NO
  340.                Sets flag #19 to False
  341.  
  342.                          Str_To_Int
  343.                          ----------
  344.  
  345.   Structure: Str_To_Int [String Code] [Integer Code]
  346.  
  347. Description: The Integer value of the string is assigned to the integer
  348.              code
  349.  
  350.    Examples: Str_To_Int I1 S1
  351.              Str_To_Int I19 S5
  352.  
  353.  
  354.  
  355.                            Type_File
  356.                            ---------
  357.  
  358.   Structure: Type_File "[Path/Filename]"
  359.  
  360. Description: Types a file to the screen and to the caller.
  361.  
  362.       Usage: In " " should be the path/filename of the file you
  363.              want to be typed to the caller and monitor.  No "
  364.              should be present.
  365.  
  366.    Examples: Type_File "C:\Powrbbs\Screen\Menu"
  367.              Type_File "D:\Fun"
  368.  
  369.                               Wait
  370.                               ----
  371.  
  372.   Structure: Wait [MilliSeconds to Pause]
  373.  
  374. Description: Waits for the certain time in milliseconds.
  375.              1000 => 1 Second
  376.  
  377.    Examples: Wait 5000     :: Pauses for 5 Seconds ::
  378.              Wait 200      :: Pauses for .2 Seconds ::
  379.  
  380.                             Write_File
  381.                             ----------
  382.  
  383.   Structure: Write_File [String #][;] [/String Length]
  384.              Write_File "[Text to write]"[;]
  385.  
  386. Description: Writes Info to the current opened file.  File must be
  387.              opened for REWRITEing, or APPENDing.
  388.              String # is the String #.  If no ; is present, C/R is
  389.              entered in the file.  If there is a ;, no C/R is present,
  390.              you can then use the / command.  The /# will write the string
  391.              to the file, set in the number of strings.  For example, if
  392.              you write S1 to the file and S1 = "516", but you want the
  393.              file to be cleared for the next data, you can use
  394.              Write_File S1; /4 which will write "516 ", instead of "516".
  395.  
  396.              Info written in Quotes, will be written to the text file.
  397.              ; places the same role as above.  No / is supported.
  398.  
  399.    Examples: Write_File S2
  400.              Write_File S2;
  401.              Write_File S2; /5
  402.              Write_File "516-873-8032"
  403.              Write_File "516-873-8032";
  404.  
  405.